import React, { Component } from 'react';
import { StyleSheet, NativeModules, TouchableOpacity, Alert, Linking } from 'react-native';
import { Container, Content, Button, View, Text } from 'native-base';
import { SearchBar, ListItem } from 'react-native-elements';
import { connect } from 'react-redux';

import Http from '../../utils/HttpPost';
import { Header, Loading, ScrollTopBar } from '../../component';
import { Colors, Metrics } from '../../theme';

class MyTransaction extends Component {
  constructor(props) {
    super(props);
    this.state = {
      isLoading: false,
      selectIndex: 0,
    }
  }

  componentDidMount() {
    // const { navigation } = this.props;
    // let index = navigation.getParam('selectIndex');//接受传过来的对象
    // console.log(index)
    // if(index){
    //   this.setState({selectIndex: index})
    // }
    
  }


  render() {
    return (
      <Container>
        <Header title="我的交易" onLeftPress={() => this.props.navigation.goBack()} />
        <Loading showLoading={this.state.isLoading} />
        <Content>
          <ScrollTopBar
            initinalIndex={this.state.selectIndex}
            topBarUnderlineStyle={{ backgroundColor: '#8e8df2', width: 40, height: 3, borderRadius: 3 }}
            labelList={['待提交', '审核中', '已完成', '未通过', '复审']}
            topBarInactiveTextColor='#666666'
            topBarActiveTextColor="#8e8df2"
            topBarBackgroundColor="#FFFFFF"
          >
            <View>
              <Text> </Text>
            </View>
            
            <View>
              <Text> </Text>
            </View>
            <View>
              <Text> </Text>
            </View>
            <View>
              <Text> </Text>
            </View>
            <View>
              <Text> </Text>
            </View>

          </ScrollTopBar>
        </Content>
      </Container>
    );
  }

}

const mapStateToProps = state => ({
  logged: state.user.logged,
  token: state.user.token,

});

const mapDispatchToProps = dispatch => ({

});
export default connect(mapStateToProps, mapDispatchToProps)(MyTransaction);

const Styles = StyleSheet.create({
  
});